DXL Attribute Update by links

Question: Is there a dxl command (or something) that allows information to be brought across a link and displayed in a dxl Attribute, WITHOUT having the dxl attribute open the source module for the data. We are using this to display trace information. Example, We have requirements that are linked to testing. In the requirement module, I want to show the name of the test (module name) and the Verification Status (enumerated attribute in the Test module) that is related (linked) to the requirement. Currently our dxl attribute opens the module in read only in the background. Due to a large number of test modules the updates become very slow. It would be really cool if we didn't need to open the modules which are the source for the data every time we wanted to update the trace matrix.
SystemAdmin - Fri Apr 03 13:11:38 EDT 2009

Re: DXL Attribute Update by links
SystemAdmin - Fri Apr 03 14:44:13 EDT 2009

Short answer: no.

You can not get attribute values from a linked module without opening the modules.

Maybe you would like to think about your use case - what you want to do? If you want a report on the traceability, does it need to be online, realtime? Or would some reporting run would be "good enough"?

Re: DXL Attribute Update by links
llandale - Sun Apr 05 15:53:22 EDT 2009

Sadly, I've never actually done it yet, but you CAN get module-level information from modules without opening them up. You cannot get object-level information without opening it up, however. In this case, you want the status of the linked test object, and will have to open up that module to get the information.

You could, I suppose, create a massive module-level text attribute in the Test module, and have a script that plows through the tests and sets the test status along with each test identifier, it may look like this:

Test1_3  InReview
Test1_4  Passed
Test1_55  Failed

 


You could then query that module level attribute, parse the huge value and find the object you care about, and display that. However, you need an on-demand script that runs often in the test module to summarize the tests.

What Pekka is getting it (I believe) is this: intead of having a real-time attr-DXL to get the status of the test right now, you can write an on-demand script that gets such status and sets the value of some text attribute in your requirements module with that information. Perhaps run this script nightly. Then you can see the status without opening up the test module, but the info will generally be a half day stale. Such a script would look something like this at its core:

 

 

for obj in entire requirement module do
{  If this isn't a requirement object then continue
   Open up all modules sourcing links to this requirement object
   follow the test link to the test object
   set obj."MyTestStatus" = test status of test object
}
save requirement module



>Louie



 

Re: DXL Attribute Update by links
dpechacek - Mon Apr 06 08:30:59 EDT 2009

You could somewhat accomplish this with crafty programming. Write your DXL attribute code to only update the value of the DXL attribute if the source module for the data is already open. DXL Attributes(unlike DXL Columns) do not lose their values. It is stored just like any other attributes, you are merely using programming to update its value instead of manual entry.

You can check if a module is open using:

if(open(module("full path to your module"))) {
   Module m = module(item("full path to your module"));
   
   // do your updating
}

 


AAI Services, Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com

 

Re: DXL Attribute Update by links
llandale - Mon Apr 06 15:33:30 EDT 2009

dpechacek - Mon Apr 06 08:30:59 EDT 2009

You could somewhat accomplish this with crafty programming. Write your DXL attribute code to only update the value of the DXL attribute if the source module for the data is already open. DXL Attributes(unlike DXL Columns) do not lose their values. It is stored just like any other attributes, you are merely using programming to update its value instead of manual entry.

You can check if a module is open using:

if(open(module("full path to your module"))) {
   Module m = module(item("full path to your module"));
   
   // do your updating
}

 


AAI Services, Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com

 

I may not have understood this correctly: "DXL Attributes(unlike DXL Columns) do not lose their values. It is stored just like any other attributes...".

The values of Attr DXL are not stored in the module, they are calculated the first time the value is needed (i.e. displayed), and can be updated on demand (and in some other cases). When the module is closed, the current values are not stored. In your case, since the code only sets obj.attrDXLName when the other module is open (specifically, does NOT erase the results when its closed), you still get nothing displayed when the module is closed, even if you DID get info when it was open. So your code won't update the value when the other module is open and retain the old value when its not, figuring to get something displayed even if its stale.

>Louie

Re: DXL Attribute Update by links
dpechacek - Mon Apr 06 15:47:17 EDT 2009

llandale - Mon Apr 06 15:33:30 EDT 2009
I may not have understood this correctly: "DXL Attributes(unlike DXL Columns) do not lose their values. It is stored just like any other attributes...".

The values of Attr DXL are not stored in the module, they are calculated the first time the value is needed (i.e. displayed), and can be updated on demand (and in some other cases). When the module is closed, the current values are not stored. In your case, since the code only sets obj.attrDXLName when the other module is open (specifically, does NOT erase the results when its closed), you still get nothing displayed when the module is closed, even if you DID get info when it was open. So your code won't update the value when the other module is open and retain the old value when its not, figuring to get something displayed even if its stale.

>Louie

You're right Louie. I had forgotten that.

AAI Services, Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com

Re: DXL Attribute Update by links
SystemAdmin - Wed Apr 08 10:22:00 EDT 2009

Thanks for the information that this indeed cannot be done, we'll have to go evaluate our options now.

Re: DXL Attribute Update by links
Doug.Zawacki - Wed Apr 08 11:32:55 EDT 2009

One option is to create text files that contain the data you want. Testing Modules writing data into and Requirements Module reading data from. That's not to say that this option doesn't have it's own set of issues but it would solve the issue of having to open the test modules up to display your trace information.

Also, you could write a "Batch Update" DXL Script that is run on a regular basis which could read the data from the test modules and update a set of "status" attributes in the Requirements module. This will eliminate the need to open the test modules when users open the Requirements module.

Good luck

Re: DXL Attribute Update by links
wcheng - Mon Nov 23 16:12:13 EST 2009

Hi,

I'm not sure if this is what you were talking about, but I mine as well throw it out there anyways. Currently, I'm working on somewhat of the same thing, and I'm using the "target()" method.
 

for l in (current Object) -> "*" do {
    o = target l               //returns the target object
        s = o."Object Text"        //returns target object text
      }

 


Again, not sure if this is what you were looking for, but if you search "target" in the DXL ref manual, you should get some more helpful info.